package com.example.SigninTest;

import java.util.regex.Pattern;







import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;

import org.openqa.selenium.*;
import org.openqa.selenium.support.ui.Select;
import org.testng.annotations.Test;

public class SearchGlobalTest  extends Base {
	 int i=0;
	
	@Test(dataProvider = "groupsFromFile", dataProviderClass=GroupDataGenerator.class)
	 public void searchGlobalTest(GroupObject group) throws Exception {
	
		  if(i==0) {
		  gotoBaseURL();
		  driver.findElement(By.linkText("Sign in with email")).click();
		  driver.findElement(By.cssSelector("form.signin > fieldset > input.email.textbox")).clear();
		  driver.findElement(By.cssSelector("form.signin > fieldset > input.email.textbox")).sendKeys("valid601@valid601.com");
		  driver.findElement(By.xpath("(//input[@type='password'])[5]")).clear();
		  driver.findElement(By.xpath("(//input[@type='password'])[5]")).sendKeys("gfhjkm123");
		  driver.findElement(By.xpath("(//input[@type='password'])[5]")).sendKeys(Keys.ENTER);
		  i++;
		  }
		  Thread.sleep(2000);
		//  gotoBaseURL(baseUrl + "/web");
		  searchGlobal(group);
		  

  }
}
